import 'package:boss/models/commodity.dart';
import 'package:boss/ui/page/commodity/pickerCategories/picker_categories_page.dart';
import 'package:flutter/material.dart';

Future<List<Commodity>> showCommodityPicker(
  BuildContext context, {
  List<Commodity> selectedCommodities,
  bool isShowPackage = true,
  bool isShowSku = false,
  type = 0,
  List<int> filterType,
}) async {
  var res = await Navigator.of(context).pushNamed(PickerCategoriesPage.pageName, arguments: {
    'type': type,
    'selectedCommodities': selectedCommodities,
    'isShowPackage': isShowPackage,
    'isShowSku': isShowSku,
    'filterType': filterType,
  });

  return res as List<Commodity>;
}
